{% from 'bootstrap/pagination.html' import render_pager, render_pagination %}
{% extends "base.html" %}


{% block title %}Flasky - {{ title }} {{ user.username }}{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>{{ title }} {{ user.username }}</h1>
</div>
<table class="table table-hover followers">
    <thead><tr><th>User</th><th>Since</th></tr></thead>
    {% for follow in follows %}
    {% if follow.user != user %}
    <tr>
        <td>
            <a href="{{ url_for('.user', username = follow.user.username) }}">
                <img class="rounded-circle shadow-1-strong me-3"
                  src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(19).webp" alt="avatar" width="30"
                  height="30" />
                {{ follow.user.username }}
            </a>
        </td>
        <td>{{ moment(follow.timestamp).format('L') }}</td>
    </tr>
    {% endif %}
    {% endfor %}
</table>
<table class="table align-middle mb-0 bg-white">
    <thead class="bg-light">
      <tr>
        <th>姓名</th>
        <th>注册时间</th>
        <th>来自</th>
        
      </tr>
    </thead>
    {% for follow in follows %}
    {% if follow.user != user %}
    <tbody>
      <tr>
        <td>
          <div class="d-flex align-items-center">
            <img
                src="https://mdbootstrap.com/img/new/avatars/8.jpg"
                alt=""
                style="width: 45px; height: 45px"
                class="rounded-circle"
                />
            <div class="ms-3">
              <p class="fw-bold mb-1">{{ follow.user.username }}</p>
              <p class="text-muted mb-0">{{ follow.user.email }}</p>
            </div>
          </div>
        </td>
        <td>
          <p class="fw-normal mb-1">{{ moment(follow.timestamp).format('LL') }}</p>
       
        <td>{{ follow.user.location }}</td>
        
      </tr>
    </tbody>
    {% endif %}
    {% endfor %}
  </table>
<div class="pagination">
    {{ render_pagination(pagination) }}
</div>
{% endblock %}